<template>
  <content-field>
    <n-card>
      <template #header> 杂物间 </template>
      <n-button @click="to_article_edit(-1)">创建文章</n-button
      ><n-button @click="to_essay_edit(-1)">创建动态</n-button>
      <n-button @click="createBadge">创建标签</n-button
      ><n-button @click="go_test">测试页</n-button></n-card
    >
    <badge-edit-view ref="badgeCreate" :id="-1" />
  </content-field>
</template>

<script>
import ContentField from "@/components/ContentField.vue";
import routerJump from "@/composables/RouterJump";

import { ref } from "@vue/reactivity";
import BadgeEditView from "./edit/BadgeEditView.vue";
export default {
  components: { ContentField, BadgeEditView },
  setup() {
    const badgeCreate = ref(null);
    const { to_article_edit, to_essay_edit, go_test } = routerJump();

    const createBadge = () => {
      badgeCreate.value.showModal = true;
    };
    return {
      createBadge,
      badgeCreate,
      to_article_edit,
      to_essay_edit,
      go_test,
    };
  },
};
</script>

<style>
</style>